﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SCS.Common.Models;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;
namespace SchoolCommunicationSystem.Models
{
    public class ClassAndSchoolModels
    {
        [Required(ErrorMessage = "Trường không được để trống")]
        public int _teacherID { get; set; }
        public int _classID { get; set; }
        public int schoolYearIDList { get; set; }
        public int classID { get; set; }
        [Required(ErrorMessage = "Trường không được để trống")]
        public int _schoolYearID { get; set; }

        [Required(ErrorMessage = "Trường không được để trống")]
        [DataType(DataType.Date)]
        [DisplayFormat(DataFormatString = "{0:dd-MM-yyyy}", ApplyFormatInEditMode = true)]
        public Nullable<System.DateTime> _startDate { get; set; }

        [Required(ErrorMessage = "Trường không được để trống")]
        [Display(Name = "Tên lớp học")]
        public string _className { get; set; }
        public int _subjectID { get; set; }
        public Nullable<int> teacherID { get; set; }

        public IEnumerable<Class> classes { get; set; }
        public IEnumerable<SelectListItem> SubjectSelectList { get; set; }
        public IEnumerable<SelectListItem> TeacherSelectList { get; set; }


        public IEnumerable<SelectListItem> SchoolYearSelectList { get; set; }
        public IEnumerable<SelectListItem> ClassSelectList { get; set; }
        public IEnumerable<ClassInSchoolYear> Classinschoolyear { get; set; }
        //public Class CLasss { get; set; }

        public int TotalRows { get; set; }
        public int PageSize { get; set; }
    }
    public class UpdateClass
    {
        public int _teacherID { get; set; }
        public int _classID { get; set; }
        public int schoolYearIDList { get; set; }
        public int classID { get; set; }
        [Required]
        public int _schoolYearID { get; set; }

        [DataType(DataType.Date)]
        [DisplayFormat(DataFormatString = "{0:dd-MM-yyyy}", ApplyFormatInEditMode = true)]
        public Nullable<System.DateTime> _startDate { get; set; }
        [Required]
        public string _className { get; set; }
        public int _subjectID { get; set; }
        public Nullable<int> teacherID { get; set; }

        public IEnumerable<Class> classes { get; set; }
        public IEnumerable<SelectListItem> SubjectSelectList { get; set; }
        public IEnumerable<SelectListItem> TeacherSelectList { get; set; }


        public IEnumerable<SelectListItem> SchoolYearSelectList { get; set; }
        public IEnumerable<SelectListItem> ClassSelectList { get; set; }
        public IEnumerable<ClassInSchoolYear> Classinschoolyear { get; set; }
        //public Class CLasss { get; set; }

        public int TotalRows { get; set; }
        public int PageSize { get; set; }
    }

    public class AssignSubjectAndTeacher
    {

        public int _classID { get; set; }
        public int ClassIDToUpdate { get; set; }
        public IEnumerable<SelectListItem> ClassSelectList { get; set; }
        public List<AssigntSubject> AssignSubject { get; set; }
        public byte? subjectID1 { get; set; }
        public byte? subjectID2 { get; set; }
        public byte? subjectID3 { get; set; }
        public byte? subjectID4 { get; set; }
        public byte? subjectID5 { get; set; }
        public byte? subjectID6 { get; set; }
        public byte? subjectID7 { get; set; }
        public byte? subjectID8 { get; set; }
        public byte? subjectID9 { get; set; }
        public byte? subjectID10 { get; set; }
        public byte? subjectID11 { get; set; }
        public byte? subjectID12 { get; set; }
        public byte? subjectID13 { get; set; }
        public byte? subjectID14 { get; set; }
        public int? teacherID1 { get; set; }
        public int? teacherID2 { get; set; }
        public int? teacherID3 { get; set; }
        public int? teacherID4 { get; set; }
        public int? teacherID5 { get; set; }
        public int? teacherID6 { get; set; }
        public int? teacherID7 { get; set; }
        public int? teacherID8 { get; set; }
        public int? teacherID9 { get; set; }
        public int? teacherID10 { get; set; }
        public int? teacherID11 { get; set; }
        public int? teacherID12 { get; set; }
        public int? teacherID13 { get; set; }
        public int? teacherID14 { get; set; }
        public IEnumerable<SelectListItem> SubjectSelectList { get; set; }
        public IEnumerable<SelectListItem> TeacherSelectList { get; set; }
    }
    public class AssigntSubject
    {
        public int TeacherID { get; set; }
        public byte SubjectID { get; set; }
    }
}